<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 活动地址
     */
    <shiro:hasPermission name="back_gotoPromotionPage_promotionAddress">
    function promotionAddressInfo() {
        /**获取选中行的id**/
        var selectedRow = $("#tt").bootstrapTable('getSelections');
        if (selectedRow.length == 1) {
            $("#btn_promotionAddress").attr("data-target", "#promotionAddressModal");/**选中了记录后才可打开对应的模态框**/
            /**重置详情页中所有html展示信息**/
            resetDetailTable("detailTablePromotionUrl");
            /**设置展示信息**/
            var front_path="${basePath}";/**前台项目路径**/
            $("#promotionUrl").html(front_path+"/front/store/salesPromotionCenter/gotoSalesPromotionCenter.sjson?promotionId="+selectedRow[0].promotionId);
        } else {
            $("#btn_promotionAddress").attr("data-target", "");/**选中了记录后才可打开对应的模态框**/
            showMsg("请选择一行记录！");
        }
    }
    </shiro:hasPermission>
</script>

<!--活动地址模态框（Modal） -->
<div class="modal fade" id="promotionAddressModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">活动地址</h5>
			</div>
			<div class="modal-body">
				<table id="detailTablePromotionUrl" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">促销活动地址:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="promotionUrl"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>